<h2>[+lang.IM_title_add_new_item+]</h2>
[+view.message+]

<form name="form_add_new_item" action="index.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="a" value="[+action_id+]" />
<input type="hidden" name="id" value="[+module_id+]" />
<input type="hidden" name="page" value="add_new_item" />
<table id="table3">
    <tbody>
        <tr>
            <td class="col1">Item name <span class="asterik">*</span></td>
            <td class="col2"><input name="data[Item][name]" type="text" class="textfield" /></td>
        </tr>

        <!--
        <tr>
            <td class="col1">Code</td>
            <td class="col2"><input name="data[Item][code]" type="text" class="textfield" /></td>
        </tr>

        
        <tr>
            <td class="col1">Price</td>
            <td class="col2"><input name="data[Item][price]" type="text" class="textfield" /></td>
        </tr>

        <tr>
            <td class="col1">Description</td>
            <td class="col2"><textarea class="editor" name="data[Item][description]" class="textfield"></textarea></td>
        </tr>

        <tr>
            <td class="col1">Size</td>
            <td class="col2"><input name="data[Item][size]" type="text" class="textfield" /></td>
        </tr>

        <tr>
            <td class="col1">Wood</td>
            <td class="col2"><input name="data[Item][text_01]" type="text" class="textfield" /></td>
        </tr>
        -->

        <tr>
            <td class="col1">Category</td>
            <td class="col2">
                <select name="data[Item][category_id][]" class="dropdown">
                [+select.categories+]
            </select>  <a href="javascript:" onclick="$(this).parent().parent().remove();">Delele</a>
            </td>
        </tr>
        <tr>
            <td class="col1"></td>
            <td class="col2"><a id="add-category-link" href="javascript:">Add another category</a></td>
        </tr>
        <script type="text/javascript">
        var category_count = 0;
        $(document).ready(function() {
            $('#add-category-link').click(function(){
                category_count++
               $(this).parent().parent().before('<tr><td class="col1">Category ' + category_count + '</td><td class="col2"><select name="data[Item][category_id][]" class="dropdown">[+select.categories+]</select>  <a href="javascript:" onclick="$(this).parent().parent().remove();">Delele</a></td></tr>');
            });
        });
        </script>

        <tr>
            <td class="col1">Image</td>
            <td class="col2">
                <input name="file[]" type="file" class="file" /> <a href="javascript:" onclick="$(this).parent().parent().remove();">Delele</a>
            </td>
        </tr>
        <tr>
            <td class="col1"></td>
            <td class="col2"><a id="add-image-link" href="javascript:">Add another image</a></td>
        </tr>
        <script type="text/javascript">
        var image_count = 0;
        $(document).ready(function() {
            $('#add-image-link').click(function(){
                image_count++
               $(this).parent().parent().before('<tr><td class="col1">Image ' + image_count + '</td><td class="col2"><input name="file[]" type="file" class="file" /> <a href="javascript:" onclick="$(this).parent().parent().remove();">Delele</a></td></tr>');
            });
        });
        </script>

        <tr>
            <td class="col1">&nbsp;</td>
            <td class="col2">
                <input name="" class="button" type="submit" value="OK" />
                <input name="" class="button" type="button" value="Cancel" />                        </td>
        </tr>
    </tbody>
</table>
</form>